package com.fifth.permission.controller;

import com.fifth.common.pojo.dto.CommonResult;
import com.fifth.permission.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @作者：刘壬杉
 * @创建时间 2022/8/31 12:12
 **/
@RestController
@RequestMapping("permission")
public class PermissionController {
    @Autowired
    private PermissionService permissionService;

    @GetMapping("leftMenus")
    public CommonResult leftPermission(HttpServletRequest request){
        String token = request.getHeader("token");
        return  permissionService.findAllByEmpid(token);
    }
}
